package com.haircut.sys.dao.dept;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.haircut.sys.model.dept.SysDept;
import com.haircut.sys.vo.dept.DeptPageReqVo;
import com.haircut.sys.vo.dept.DeptPageResVo;
import com.haircut.sys.vo.dept.DeptReqVo;
import com.modular.result.PageParams;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SyDeptMapper extends BaseMapper<SysDept> {
    /**
     * 分页查询
     * @param reqVo
     * @return
     */
   List<DeptPageResVo> findAll(@Param("reqVo") DeptPageReqVo reqVo);

    /**
     * 获得权限数据
     * @param reqVo
     * @return
     */
   List<SysDept> findPermissionByParentId(@Param("reqVo") DeptReqVo reqVo);

    /**
     * 查询计算的部门
     * @param pageReq
     * @param reqVo
     * @return
     */
   Page<SysDept> findCalcDeptPage(IPage<?> pageReq,@Param("reqVo")  PageParams reqVo);


}
